import request from "../utils/http.ts";
import {TypeVO} from "../type/type";

/**
 * 获取点餐类型
 * @returns {Promise<TypeVO[]>}
 * */
export function getTypeAPI() {
    return request<TypeVO[]>({
        url: '/orderType/list',
        method: 'GET',
    })
}

/**
 * 添加点餐类型
 * @param form
 * */
export function add(form:FormData) {
    return request<TypeVO>({
        url: '/orderType/add',
        method: 'post',
        data: form
    })
}
